<script>
	function checkForm()
	{
		if(document.f.name.value=="")
		{
			alert('Vui lòng điền `Tên loại sản phẩm`!');
			document.f.name.focus();
			return false;
		}
	}
</script>
<?php
	$sql="SELECT * FROM tbl_product_type WHERE `id`='$_POST[guid]'";
	$res=mysql_query($sql);
			
	if(!$res)
		dieN(mysql_error());
		
	$row=mysql_fetch_array($res);
?>
<form name="f" method="POST" onsubmit="return checkForm()" enctype="multipart/form-data">
	<input type="hidden" name="act" value="actionUpdate"></input>
	<input type="hidden" name="guid" value="<?php echo $_POST["guid"];?>"></input>
	<input type="hidden" name="old_image" value="<?php echo $row["image"];?>"></input>
	<table class="tbl_action">	
		<tr>
			<th>Tên loại sản phẩm <span style='color:#FF0000'>(*)</span></th>
			<td><input type="text" name='name' value="<?php echo $row["name"]?>"></input></td>
		</tr>		
		<tr>
			<th>Ghi chú</th>
			<td><textarea name='detail'><?php echo $row["detail"]?></textarea></td>
		</tr>
		<tr>
			<th></th>
			<th>
				<input type="submit" value="Sửa"></input><input type="reset" value="Mặc định"></input><input type="button" value="Đóng" onclick="window.location='?zone=product_type'"></input>&nbsp;&nbsp;&nbsp;&nbsp;<span style='color:#FF0000;'>(*)</span> Thông tin bắt buộc
			</th>
		</tr>
	</table>
</form>